home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #3
/
Amiga Plus CD - 2002 - No. 03.iso
/
AmiSoft
/
Util
/
Cli
/
Howdif.lha
/
howdif
/
HowDif.doc
< prev
Wrap
Text File
|
2003-01-10
|
5KB
|
109 lines
The files in this archive are used to compare binary files. The MS-DOS
"compare" utility only reports ten mismatches, then stops comparing.
It is used primarily when there is an assumption that the two files in
question are most likely identical.
We had a use for a program that assumed just the opposite; that the two
files were probably quite a bit dissimilar. We needed to know HOW MUCH
they differed and WHERE. So we wrote this program, which does just that.
The program knows the Emerson Arcadia 2001 character set, so is
especially useful for comparing ROM images and hunting for easter eggs
for that system, but the program is also useful for more general
purposes.
You use it from the command line. Usage is as follows:
1> HowDif <file1> [<file2>] [-v|VANILLA] [-w|WIDE]
where the arguments are the files you wish to compare. For example:
1> HowDif nibble.bin supergob.bin -v WIDE
If only one filename is given, the program merely shows a dump of the
file. All output from the program goes to the standard output, and thus
can be piped or redirected as desired.
The primary file is whichever of the two files is smaller, or the
first file specified if their sizes are equal. The contents of the
primary file are shown. Bytes which are different in each file are
shown in black (Amiga) or red (MS-DOS). Bytes which are the same in both
files are shown in white (Amiga) or green (MS-DOS).
It is "quick-and-dirty". It is also freeware. The authors
included both the executable (object) code and the source code.
The MS-DOS version requires ANSI.SYS to be running to get a correct
display. It also has significant limits on the sizes of the files which
can be processed, due to the poor memory architecture of MS-DOS. We
suggest use of the superior Amiga version wherever possible. The AmigaDOS
version has no requirements whatsoever, and should in theory work under
any version of AmigaOS from 1.0 onwards.
On the left is the hex dump of the primary file, in the middle is the
ASCII representation of the primary file, and on the right is an Emerson
Arcadia 2001 character set representation of the primary file.
The -v option suppresses the emitting of ANSI codes, resulting in
monochrome output.
The -w option shows 16 bytes per line rather than the usual 14. The
ASCII representations are not shown in this mode.
The ASCII representation shows control characters ($00-$1F and $80-$9F)
as `.'. Note that obviously you will get different ASCII representations
on the Amiga and MS-DOS, due to the differing extended ASCII sets used.
The Arcadia uses a 64-character set, shown below. Graphics characters
are represented by lowercase letters.
$0123456789ABCDEF
----------------
$00: /\abcdefghijklm $00 : space
$10: 0123456789ABCDEF $01-$0F (/-m): graphics characters
$20: GHIJKLMNOPQRSTUV $38-$3B (n-q): sprites 0-3
$30: WXYZ.,+$nopqrstu $3C-$3F (r-u): user defined characters 0-3
$03 (a): ########
########
########
########
########
########
########
########
$04 (b): ######## $05 (c): ......## $06 (d): ........ $07 (e): ##......
######## ......## ........ ##......
........ ......## ........ ##......
........ ......## ........ ##......
........ ......## ........ ##......
........ ......## ........ ##......
........ ......## ######## ##......
........ ......## ######## ##......
$08 (f): ######## $09 (g): ######## $0A (h): ##...... $0B (i): ......##
######## ######## ##...... ......##
......## ##...... ##...... ......##
......## ##...... ##...... ......##
......## ##...... ##...... ......##
......## ##...... ##...... ......##
......## ##...... ######## ########
......## ##...... ######## ########
$0C (j): .......# $0D (k): #....... $0E (l): ######## $0F (m): ########
......## ##...... #######. .#######
.....### ###..... ######.. ..######
....#### ####.... #####... ...#####
...##### #####... ####.... ....####
..###### ######.. ###..... .....###
.####### #######. ##...... ......##
######## ######## #....... .......#
URL: http://www.users.bigpond.com/james.jacobs/amigan.html
EMail: amigansoftware@abime.net
Enjoy!
James Jacobs and Ward Shrake